﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Cesave.Domain.PermisosModule.Entities;
using Cesave.Infrastructure.Data.Core;
using Cesave.Domain.PermisosModule.Contracts.Acreditaciones;
using Cesave.Infrastructure.Data.PermisosModule.Context;
using Cesave.Infrastructure.CrossCutting.Logging;

namespace Cesave.Infrastructure.Data.PermisosModule.Repositories
{
	public class AcreditacionRepository
		: GenericRepositoryEx<Acreditacion>, IAcreditacionRepository
	{
		public AcreditacionRepository(IPermisosModuleContext context, ITraceManager traceManager)
			: base(context, traceManager)
		{
		}

		#region IAcreditacionRepository Members

		public Acreditacion FindAcreditacionByGuidSpecification(AcreditacionByGuidSpecification acreditacionGuidSpecification)
		{
			if (acreditacionGuidSpecification == null)
				throw new ArgumentNullException("acreditacionGuidSpecification");
			return GetBySpec(acreditacionGuidSpecification).FirstOrDefault();
		}

		#endregion
	}
}